/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.amse.grigory.dchess.view;

import java.io.File;
import javax.swing.filechooser.FileFilter;


/**
 *
 * @author grigory
 */
public class Filters {

    public static FileFilter getGameFilter() {
        return new GameFilter();
    }    

    private static class GameFilter extends FileFilter {

        @Override
        public boolean accept(File f) {
            if (f.isDirectory()) {
                return true;
            }
            return f.getName().endsWith("xml");
        }

        public String getDescription() {
            return "Xml files (*.xml)";
        }
    }
}
